<!-- table 的操作按钮 -->
<template>
  <div>
    <a @click="jumpDetail('look')" v-btnPermission="[{code:'seex_pm_045_loo_01',ident:'prma_seex'},{code:'buco_pm_045_loo_01',ident:'prma_buco'}]">查看</a>
    <!-- 待提交 -->
    <span v-if="item.status == 0" @click="jumpDetail('update')" v-btnPermission="[{code:'seex_pm_045_edi_02',ident:'prma_seex'},{code:'buco_pm_045_edi_02',ident:'prma_buco'}]">
      <a-divider type="vertical" />
      <a>编辑</a>
    </span>
    <!-- 已提交 -->
    <span v-else v-btnPermission="[{code:'seex_pm_045_exp_03',ident:'prma_seex'},{code:'buco_pm_045_exp_03',ident:'prma_buco'}]">
      <a-divider type="vertical" />
        <service-export-mould
        url="/planTask/exportWord"
        :requestParams="{ id: item.id }"
        icon="cloud-download"
        :serviceiUrl="faceApiUrl"
        :isButton="false"
      ></service-export-mould>
    </span>
  </div>
</template>

<script>
import ServiceExportMould from '@/components/ServiceExportMould'
export default {
  name: 'Opera',
  props: {
    item: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      faceApiUrl: '/plan-producer-server'
    }
  },

  components: { ServiceExportMould },

  computed: {},

  created() {},

  mounted() {},

  methods: {
    jumpDetail(type) {
      this.$router.push({
        name: 'ProjectPlanningTaskListDetail',
        query: {
          id: this.item.id,
          pageType: type
        }
      })
    }
  }
}
</script>
<style lang='less' scoped>
</style>